home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1998 July / EnigmA AMIGA RUN 29 (1998)(G.R. Edizioni)(IT)[!][issue 1998-07 & 08].iso / cd-sup / cdrom / amicdfs2 / installcdfs < prev    next >
Text File  |  1998-05-24  |  5KB  |  186 lines

  1. ; $VER: AmiCDFS Installer 1.0 (22.4.97) Neil Bothwick
  2. ;
  3. ; This installer was written specifically for installing
  4. ; AmiCDFS from the CU amiga cover CDs
  5.  
  6. ;;; Set paramemters and defaults
  7. (set
  8.     CD32Dev         'cd.device'
  9.     CD32Unit        '0'
  10.     SquirrelDev     'squirrelscsi.device'
  11.     SquirrelUnit    '3'
  12.     OtherDev        'scsi.device'
  13.     OtherUnit       '3'
  14.     DevNum    '0'
  15. )
  16. ;;;
  17. ;;; Check CPU
  18. (set cpu030 (> (database 'cpu') '68020'))
  19. ;;;
  20. ;;; Get device driver and unit
  21. (set DriveNum
  22.     (askchoice
  23.         (prompt 'Are you installing on a CD32, an A1200 with Squirrel (or Surf Squirrel), or a different setup?')
  24.         (help 'This information is needed to determine the correct device driver')
  25.         (choices '\x1B[2pCD32' 'Squirrel/Surf Squirrel' 'Other')
  26.         (default 2)
  27.     )
  28. )
  29. (set DevDriver
  30.     (select DriveNum
  31.         (CD32Dev)
  32.         (SquirrelDev)
  33.         (askstring
  34.             (prompt 'Enter the name of your device driver\n\nThis is CASE SENSITIVE')
  35.             (help
  36.                 (cat
  37.                     'This is the driver for your CD drives interface. '
  38.                     'It is usually something like scsi.device or atapi.device\n\n'
  39.                     'IMPORTANT: This is Case-Sensitive'
  40.                 )
  41.             )
  42.             (default OtherDev)
  43.         )
  44.     )
  45. )
  46. (set DevUnit
  47.     (select DriveNum
  48.         (CD32Unit)                  ; CD32
  49.         (askstring                  ; Squirrel
  50.             (prompt 'Enter the unit number of your CDROM drive.')
  51.             (help
  52.                 (cat
  53.                     'This will be stored in the Icon tooltypes of the file created in '
  54.                     'DEVS:DOSDrivers, you can change it if you need to by clicking on the '
  55.                     'icon once and selecting Information from the workbench icons menu'
  56.                 )
  57.             )
  58.             (default SquirrelUnit)
  59.         )
  60.         (askstring                  ; Other
  61.             (prompt 'Enter the unit number of your CDROM drive.')
  62.             (help
  63.                 (cat
  64.                     'This will be stored in the Icon tooltypes of the file created in '
  65.                     'DEVS:DOSDrivers, you can change it if you need to by clicking on the '
  66.                     'icon once and selecting Information from the workbench icons menu'
  67.                 )
  68.             )
  69.             (default OtherUnit)
  70.         )
  71.     )
  72. )
  73. ;;;
  74. ;;; Get unused name for CD drive
  75. ; Check for a mounted device
  76. (while (not (run (cat 'testdevice >NIL: CD' DevNum ':')))
  77.     (set DevNum (+ DevNum 1))
  78. )
  79. ; Check for a DEVS:DOSDrivers entry
  80. (while (exists (cat 'DEVS:DOSDrivers/CD' DevNum) (noreq))
  81.     (set DevNum (+ DevNum 1))
  82. )
  83. ; Check for a SYS:Storage/DOSDrivers entry
  84. (while (exists (cat 'SYS:Storage/DOSDrivers/CD' DevNum) (noreq))
  85.     (set DevNum (+ DevNum 1))
  86. )
  87. (set DevName (cat 'CD' DevNum))
  88. ;;;
  89. ;;; Copy files
  90. (copylib
  91.     (prompt '') (help '')
  92.     (source
  93.         (if cpu030
  94.             ('L/AmiCDFS.030')
  95.             ('L/AmiCDFS')
  96.         )
  97.     )
  98.     (dest 'L:')
  99.     (newname 'AmiCDFS')
  100. )
  101. (copylib
  102.     (prompt '') (help '')
  103.     (source 'C/Mount')
  104.     (dest 'C:')
  105. )
  106. (copylib
  107.     (prompt '') (help '')
  108.     (source 'C/SetPatch')
  109.     (dest 'C:')
  110. )
  111. (copylib
  112.     (prompt '') (help '')
  113.     (source 'C/SetCDFS')
  114.     (dest 'C:')
  115. )
  116. (copylib
  117.     (prompt '') (help '')
  118.     (source 'LIBS/wbstart.library')
  119.     (dest 'LIBS:')
  120. )
  121. (copylib
  122.     (prompt '') (help '')
  123.     (source 'Icons/def_CDDAdisk.info')
  124.     (dest 'ENVARC:sys')
  125. )
  126. ;;;
  127. ;;; Create mountfile in DEVS:
  128. (textfile
  129.     (prompt '') (help '')
  130.     (dest (cat 'DEVS:DOSDrivers/' DevName))
  131.     (append '/* $VER: CD0 2.36 (22.08.96)\n')
  132.     (append ' *\n')
  133.     (append ' * CD-ROM filesystem mount entry\n')
  134.     (append ' *\n')
  135.     (append ' * Created by CU Amiga CD AmiCDFS installer\n')
  136.     (append ' */\n')
  137.     (append '\n')
  138.     (append (cat '         Device = ' DevDriver '\n'))
  139.     (append '     FileSystem = L:AmiCDFS\n')
  140.     (append '          Flags = 0\n')
  141.     (append ' BlocksPerTrack = 32\n')
  142.     (append '      BlockSize = 2048\n')
  143.     (append '       Reserved = 0\n')
  144.     (append '         LowCyl = 0\n')
  145.     (append '        HighCyl = 11000\n')
  146.     (append '       Surfaces = 1\n')
  147.     (append '        Buffers = 64\n')
  148.     (append '     BufMemType = 1\n')
  149.     (append '           Mask = 0x7fffffff\n')
  150.     (append '        GlobVec = -1\n')
  151.     (append '       Priority = 10\n')
  152.     (append '        DosType = 0x43444653\n')
  153.     (append '      StackSize = 600\n')
  154.     (append '          Mount = 1\n')
  155.     (append '\n')
  156.     (append '        Control = "LC BL=8 FB=32"\n')
  157.     (append '\n')
  158.     (append '/* Unit number is given in icon tooltype\n')
  159.     (append ' *\n')
  160.     (append ' * Control field template:\n')
  161.     (append ' *\n')
  162.     (append ' * LC=LOWERCASE/S,CS=CASESENSE/S,\n')
  163.     (append ' * HF=HFSFIRST/S,TD=TRACKDISK/S,\n')
  164.     (append ' * BL=BUFFERLINES/K/N,FB=FILEBUFFERS/K/N,\n')
  165.     (append ' * DC=DISKCHANGE/K/N,MT=MOTORTIME/K/N,\n')
  166.     (append ' * SD=STARTDELAY/K/N,TDC=TDCHANGE/S,\n')
  167.     (append ' * TOSHIBA/S,OLDMODE/S\n')
  168.     (append ' */\n')
  169. )
  170. (copyfiles
  171.     (prompt '')(help '')
  172.     (source 'CD0.info')
  173.     (dest 'DEVS:DOSDrivers')
  174.     (newname (cat DevName '.info'))
  175. )
  176. (tooltype
  177.     (prompt '') (help '')
  178.     (dest (cat 'DEVS:DOSDrivers/' DevName))
  179.     (settooltype 'UNIT' DevUnit)
  180. )
  181. ;;;
  182.  
  183. (exit (cat '\nAmiCDFS has been installed as ' DevName ':') (quiet))
  184.  
  185.  
  186.